<template>
  <t-dialog :header="`${header}-验收详情`" :visible.sync="visible" :onClose="closeDialog" :closeOnOverlayClick="false"
    :confirmBtn="null" width="80%" top="5%" v-if="isDialog">
    <div :style="{ height: reviewOpen ? '80vh' : '65vh' }">
      <t-tabs size="medium" v-model="tabValue">
        <t-tab-panel :class="[reviewOpen ? 'tab-full-panel' : 'tab-panel']" value="1" label="基本信息">
          <t-form ref="form" class="step-form table-form" :data="formData0" labelWidth="180px">
            <t-row>
              <t-col :span="2" class="title">项目名称</t-col>
              <t-col :span="10">{{ projectData.projectName }}</t-col>
            </t-row>
            <t-row>
              <t-col :span="2" class="title">承担单位</t-col>
              <t-col :span="10">{{ projectData.declareDeptName }}</t-col>
            </t-row>
            <t-row>
              <t-col :span="2" class="title">合作单位</t-col>
              <t-col :span="10">{{ companyList.join(',') }}</t-col>
            </t-row>
            <t-row>
              <t-col :span="2" class="title">项目起止时间</t-col>
              <t-col :span="4">{{ projectData?.startDate?.substring(0, 4) }} 年 {{ projectData?.startDate?.substring(5,
                7) }} 月 至
                {{ projectData?.endDate?.substring(0, 4) }} 年 {{ projectData?.endDate?.substring(5, 7) }} 月
              </t-col>
              <t-col :span="2" class="title">项目编号</t-col>
              <t-col :span="4">{{ projectData.projectNum }}</t-col>
            </t-row>
            <t-row>
              <t-col :span="2" class="title"><span class="require">*</span>申请验收形式</t-col>
              <t-col :span="4">
                <t-form-item name="applyType">
                  <t-radio-group disabled v-model="formData0.applyType" :options="dict.type.apply_type"></t-radio-group>
                </t-form-item>
              </t-col>
              <t-col :span="2" class="title"><span class="require">*</span>联系人</t-col>
              <t-col :span="4">
                <t-form-item name="linker">
                  {{ formData0.linker }}
                </t-form-item>
              </t-col>
            </t-row>
            <t-row>
              <t-col :span="2" class="title"><span class="require">*</span>申请验收时间</t-col>
              <t-col :span="4">
                <t-form-item name="acceptanceDate">
                  {{ formData0.acceptanceDate }}
                </t-form-item>
              </t-col>
              <t-col :span="2" class="title"><span class="require">*</span>联系电话</t-col>
              <t-col :span="4">
                <t-form-item name="linkerPhone">
                  {{ formData0.linkerPhone }}
                </t-form-item>
              </t-col>
            </t-row>
            <t-row style="min-height: 300px">
              <t-col :span="2" class="title"><span class="require">*</span>
                <a class="t-button-link"
                  :href="site_tag === 'jtt' ? `${file_domain}/view/模板/验收申请材料模板.docx` : `${file_domain}/view/模板/验收申请材料模板.docx`"
                  target="_blank">提供验收的技术文件清单(模版)</a></t-col>
              <t-col :span="10" style="justify-content: center">
                <t-table size="small" row-key="id" :columns="projectFileColumns" :data="projectFileData">
                  <template #id="{ row, rowIndex }">
                    {{ rowIndex + 1 }}
                  </template>
                  <template #files="{ row }">
                    <div v-for="(item, index) in row.fileLists" :key="index">
                      <a class="t-button-link" target="_blank" :href="item.url">
                        {{ item.name }}
                      </a>
                    </div>
                  </template>
                  <template #c1="{ row }">
                    <a v-if="row.c3" class="t-button-link" :href="`${file_domain}/${row.c3}`" target="_blank">{{
                      row.c1
                    }}</a>
                    <div v-else>{{ row.c1 }}</div>
                  </template>
                </t-table>
              </t-col>
            </t-row>
            <t-row style="min-height: 300px">
              <t-col :span="2" class="title">其他相关资料及各类证明材料</t-col>
              <t-col :span="10" style="justify-content: center">
                <t-table size="small" row-key="id" :columns="projectFileColumns" :data="projectFileData2">
                  <template #id="{ row, rowIndex }">
                    {{ rowIndex + 1 }}
                  </template>
                  <template #files="{ row }">
                    <div v-for="(item, index) in row.fileLists" :key="index">
                      <a class="t-button-link" target="_blank" :href="item.url">
                        {{ item.name }}
                      </a>
                    </div>
                  </template>
                  <template #c1="{ row }">
                    <a v-if="row.c3" class="t-button-link" :href="`${file_domain}/${row.c3}`" target="_blank">{{
                      row.c1
                    }}</a>
                    <div v-else>{{ row.c1 }}</div>
                  </template>
                </t-table>
              </t-col>
            </t-row>
          </t-form>
        </t-tab-panel>
        <!--        <t-tab-panel value="3" label="研究成果">-->
        <!--          <project-achievement></project-achievement>-->
        <!--        </t-tab-panel>-->
        <t-tab-panel :class="[reviewOpen ? 'tab-full-panel' : 'tab-panel']" value="2" label="验收意见书">
          <acceptance-opinion-detail :acceptance-id="acceptanceId" :onlyShowAssignFile="onlyShowAssignFile"
            :review-open="reviewOpen" :obj-id="objId" :row="row" :tab-default-value="opinionTabDefaultValue"
            :projectName="projectData.projectName"></acceptance-opinion-detail>
          <!--          <div v-else style="height: 65vh;display: flex;justify-content: center;align-items: center;font-weight: bold;font-size: 50px;color: #ccc;">待验收意见书填报...</div>-->
        </t-tab-panel>
        <!-- <t-tab-panel :class="[reviewOpen ? 'tab-full-panel' : 'tab-panel']" value="3" label="评审组信息">
          <t-row style="align-items: stretch" :gutter="14">
            <t-col :span="12">
              <expert-account-detail
                :projectName="header"
                isAdminOrKjc
                :createUserId="row.createUserId"
                :objId="objId"
              ></expert-account-detail>
            </t-col>
          </t-row>
        </t-tab-panel> -->
      </t-tabs>
    </div>
  </t-dialog>
  <div v-else>
    <t-tabs size="medium" v-model="tabValue">
      <t-tab-panel :class="[reviewOpen ? 'tab-full-panel' : 'tab-panel']" value="1" label="基本信息">
        <t-form ref="form" class="step-form table-form" :data="formData0" labelWidth="180px">
          <t-row>
            <t-col :span="2" class="title">项目名称</t-col>
            <t-col :span="10">{{ contractData.projectName }}</t-col>
          </t-row>
          <t-row>
            <t-col :span="2" class="title">承担单位</t-col>
            <t-col :span="10">{{ projectData.declareDeptName }}</t-col>
          </t-row>
          <t-row>
            <t-col :span="2" class="title">合作单位</t-col>
            <t-col :span="10">{{ companyList.join(',') }}</t-col>
          </t-row>
          <t-row>
            <t-col :span="2" class="title">项目起止时间</t-col>
            <t-col :span="4">{{ contractData?.startDate?.substring(0, 4) }} 年 {{ contractData?.startDate?.substring(5,
              7)
              }} 月 至
              {{ contractData?.completeDate?.substring(0, 4) }} 年 {{ contractData?.completeDate?.substring(5, 7) }} 月
            </t-col>
            <t-col :span="2" class="title">项目编号</t-col>
            <t-col :span="4">{{ projectData.projectNum }}</t-col>
          </t-row>
          <t-row>
            <t-col :span="2" class="title"><span class="require">*</span>申请验收形式</t-col>
            <t-col :span="4">
              <t-form-item name="applyType">
                <t-radio-group disabled v-model="formData0.applyType" :options="dict.type.apply_type"></t-radio-group>
              </t-form-item>
            </t-col>
            <t-col :span="2" class="title"><span class="require">*</span>联系人</t-col>
            <t-col :span="4">
              <t-form-item name="linker">
                {{ formData0.linker }}
              </t-form-item>
            </t-col>
          </t-row>
          <t-row>
            <t-col :span="2" class="title"><span class="require">*</span>申请验收时间</t-col>
            <t-col :span="4">
              <t-form-item name="acceptanceDate">
                {{ formData0.acceptanceDate }}
              </t-form-item>
            </t-col>
            <t-col :span="2" class="title"><span class="require">*</span>联系电话</t-col>
            <t-col :span="4">
              <t-form-item name="linkerPhone">
                {{ formData0.linkerPhone }}
              </t-form-item>
            </t-col>
          </t-row>
          <t-row style="min-height: 300px">
            <t-col :span="2" class="title"><span class="require">*</span>
              <!-- <a class="t-button-link"  :href="site_tag==='jtt'?`${file_domain}/view/模板/附件7：江西省交通运输厅科技项目验收申请书.doc`:`${file_domain}/view/模板/附件7：江西省交通投资集团有限责任公司科技项目验收申请书.doc`" target="_blank">提供验收的技术文件清单(模版)</a> -->
              <a :href="site_tag === 'jtt' ? `${file_domain}/view/模板/验收申请材料模板.docx` : `${file_domain}/view/模板/验收申请材料模板.docx`"
                class="t-button-link" target="_blank">提供验收的技术文件清单(模版)</a>
            </t-col>
            <t-col :span="10" style="justify-content: center">
              <t-table size="small" row-key="id" :columns="projectFileColumns" :data="projectFileData">
                <template #id="{ row, rowIndex }">
                  {{ rowIndex + 1 }}
                </template>
                <template #files="{ row }">
                  <div v-for="(item, index) in row.fileLists" :key="index">
                    <a class="t-button-link" target="_blank" :href="item.url">
                      {{ item.name }}
                    </a>
                  </div>
                </template>
                <template #c1="{ row }">
                  <a v-if="row.c3" class="t-button-link" :href="`${file_domain}/${row.c3}`" target="_blank">{{
                    row.c1
                  }}</a>
                  <div v-else>{{ row.c1 }}</div>
                </template>
              </t-table>
            </t-col>
          </t-row>
          <t-row style="min-height: 300px">
            <t-col :span="2" class="title">其他相关资料及各类证明材料</t-col>
            <t-col :span="10" style="justify-content: center">
              <t-table size="small" row-key="id" :columns="projectFileColumns" :data="projectFileData2">
                <template #id="{ row, rowIndex }">
                  {{ rowIndex + 1 }}
                </template>
                <template #files="{ row }">
                  <div v-for="(item, index) in row.fileLists" :key="index">
                    <a class="t-button-link" target="_blank" :href="item.url">
                      {{ item.name }}
                    </a>
                  </div>
                </template>
                <template #c1="{ row }">
                  <a v-if="row.c3" class="t-button-link" :href="`${file_domain}/${row.c3}`" target="_blank">{{
                    row.c1
                  }}</a>
                  <div v-else>{{ row.c1 }}</div>
                </template>
              </t-table>
            </t-col>
          </t-row>
        </t-form>
      </t-tab-panel>
      <!--      <t-tab-panel value="3" label="研究成果">-->
      <!--        <project-achievement></project-achievement>-->
      <!--      </t-tab-panel>-->
      <t-tab-panel :class="[reviewOpen ? 'tab-full-panel' : 'tab-panel']" value="2" label="验收意见书">
        <t-sticky-tool v-if="openYSYJS" :style="{ position: 'absolute', overflow: 'hidden', zIndex: 1000 }"
          :offset="[-40, -20]" @click="createPDF">
          <t-sticky-item style="width: 120px" label="导出验收意见书PDF">
            <template #icon>
              <t-icon name="file-pdf"></t-icon>
            </template>
          </t-sticky-item>
        </t-sticky-tool>
        <acceptance-opinion-detail :acceptance-id="acceptanceId" :onlyShowAssignFile="onlyShowAssignFile"
          :review-open="reviewOpen" :row="row" :obj-id="objId" :tab-default-value="opinionTabDefaultValue"
          :projectName="projectData.projectName"></acceptance-opinion-detail>
        <!--        <div v-else style="height: 65vh;display: flex;justify-content: center;align-items: center;font-weight: bold;font-size: 50px;color: #ccc;">待验收意见书填报...</div>-->
      </t-tab-panel>
      <!-- <t-tab-panel :class="[reviewOpen ? 'tab-full-panel' : 'tab-panel']" value="3" label="评审组信息">
        <t-row style="align-items: stretch" :gutter="14">
          <t-col :span="12">
            <expert-account-detail
                :projectName="header"
                isAdminOrKjc
                :createUserId="row.createUserId"
                :objId="objId"
              ></expert-account-detail>
          </t-col>
        </t-row>
      </t-tab-panel> -->
    </t-tabs>
  </div>
</template>

<script>
import { VITE_FILE_DOMAIN } from '@/api/upload'
import FileUpload from '@/components/FileUpload/index.vue';
import ProjectAchievement from '../../achievement/components/project-achievement.vue';
import { getFiles } from '@/api/common';
import dayjs from 'dayjs';
import acceptanceOpinionDetail from './acceptance-opinion-detail.vue';
// 使用动态导入来避免循环依赖
const ExpertAccountDetail = () => import('@/pages/kjxm/apply/components/expert-account-detail.vue');
export default {
  name: 'acceptance-detail-dialog',
  dicts: ['apply_type'],
  components: {
    FileUpload,
    ProjectAchievement,
    acceptanceOpinionDetail,
    ExpertAccountDetail
  },
  props: {
    objId: [String, Number],
    header: String,
    row: Object,
    isDialog: {
      type: Boolean,
      default: true,
    },
    tabDefaultValue: {
      type: String,
      default: '1',
    },
    opinionTabDefaultValue: {
      type: String,
      default: '1',
    },
    reviewOpen: {
      type: Boolean,
      default: false,
    },
    onlyShowAssignFile: {
      type: Boolean,
      default: false,
    },
  },
  data () {
    return {
      site_tag: import.meta.env.VITE_SITE_TAG,
      file_domain: VITE_FILE_DOMAIN,
      acceptanceId: null,
      openYSYJS: false,
      yjsLoading: false,
      projectFileData: [
        {
          id: 1,
          c1:
            import.meta.env.VITE_SITE_TAG === 'jtt'
              ? '《江西省交通运输厅科技项目验收申请表》（需要盖章）'
              : '《江西省交通投资集团有限责任公司科技项目验收申请表》（需要盖章）',
          c2: '是',
          moduleKey: 'projectYSSQB',
          fileIds: [],
          fileLists: [],
          require: true,
        },
        {
          id: 2,
          c1:
            import.meta.env.VITE_SITE_TAG === 'jtt'
              ? '《江西省交通运输厅科技项目任务书（合同）》'
              : '《江西省交通投资集团有限责任公司科技项目任务书（合同）》',
          c2: '是',
          moduleKey: 'projectRWS',
          fileIds: [],
          fileLists: [],
          require: true,
        },
        {
          id: 3,
          c1: '项目研究工作总结',
          c2: '是',
          moduleKey: 'projectYJGZZJ',
          fileIds: [],
          fileLists: [],
          require: true,
        },
        {
          id: 4,
          c1: '项目研究（技术）报告（按照中华人民共和国交通行业标准JT/T483—2002《交通科技报告编写规则》编写）',
          c2: '是',
          moduleKey: 'projectYJBG',
          fileIds: [],
          fileLists: [],
          require: true,
        },
        {
          id: 5,
          c1: '科技查新报告',
          c2: '否',
          moduleKey: 'projectCXBG',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 6,
          c1: '产品测试（检测）报告',
          c2: '否',
          moduleKey: 'projectCPCSBG',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 7,
          c1: '用户使用报告',
          c2: '否',
          moduleKey: 'projectYHSYBG',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 8,
          c1: '经济和社会效益分析报告',
          c2: '否',
          moduleKey: 'projectJJHSHFXBG',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 9,
          c1: '科技项目经费（预）决算表（需要盖章）',
          c2: '是',
          moduleKey: 'projectJFJSBJCWBG',
          fileIds: [],
          fileLists: [],
          require: true,
        },
        {
          id: 10,
          c1: '经费支出50万元以上（含）的项目，需提交具有审计资质的会计师事务所出具的项目验收财务审计报告（需包含佐证材料复印件）。经费支出50万元以下的项目，由项目承担单位出具项目验收财务报告和经费支出记账凭证及相关附件（如发票、签收单、合同等）或具有审计资质的会计师事务所出具的项目验收财务审计报告（需包含佐证材料复印件）',
          c2: '是',
          moduleKey: 'projectJFCWBG',
          fileIds: [],
          fileLists: [],
          require: true,
        },
      ],
      projectFileData2: [
        {
          id: 1,
          c1: '已获成果、专利及发表论文等一览表',
          c2: '否',
          moduleKey: 'projectCGB',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 2,
          c1: '项目所购置的仪器、设备等固定资产清单',
          c2: '否',
          moduleKey: 'projectGDZCD',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 3,
          c1: '测试、研制样机、样品的图片及数据，各类证明材料',
          c2: '否',
          moduleKey: 'projectCCYPZMCL',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 4,
          c1: '项目研究成果简介',
          c2: '否',
          moduleKey: 'projectYJCGJJ',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 5,
          c1: '科技成果公开承诺书',
          c2: '否',
          moduleKey: 'projectCGGKCNS',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 6,
          c1: '项目研究绩效情况表',
          c2: '否',
          moduleKey: 'projectYJJXQKB',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 7,
          c1:
            import.meta.env.VITE_SITE_TAG === 'jtt'
              ? '江西省交通运输厅科技项目研究成果'
              : '江西省交通投资集团有限责任公司科技项目研究成果',
          c2: '否',
          moduleKey: 'projectYJCG',
          fileIds: [],
          fileLists: [],
          require: false,
        },
        {
          id: 8,
          c1: '其他相关材料',
          c2: '否',
          moduleKey: 'projectQTXGCL',
          fileIds: [],
          fileLists: [],
          require: false,
        },
      ],
      projectFileData3: [
        {
          id: 1,
          c1: '验收意见书',
          c2: '走完验收评审后上传',
          moduleKey: 'projectYSSJS',
          fileIds: [],
          fileLists: [],
          require: true,
        },
      ],
      projectFileColumns: [
        {
          colKey: 'id',
          title: '序号',
          align: 'center',
          width: 64,
        },
        {
          colKey: 'c1',
          title: '附件名称',
          align: 'center',
        },
        {
          colKey: 'c2',
          title: '是否必需',
          align: 'center',
        },
        {
          colKey: 'files',
          title: '附件列表',
          align: 'left',
        },
        // {
        //   colKey: "op",
        //   title: "操作",
        //   align: "center",
        // },
      ],
      projectFileColumns2: [
        {
          colKey: 'id',
          title: '序号',
          align: 'center',
          width: 64,
        },
        {
          colKey: 'c1',
          title: '附件名称',
          align: 'center',
        },
        {
          colKey: 'c2',
          title: '是否必需',
          align: 'center',
        },
        {
          colKey: 'files',
          title: '附件列表',
          align: 'left',
        },
        {
          colKey: 'op',
          title: '操作',
          align: 'center',
        },
      ],
      tabValue: this.tabDefaultValue,
      visible: true,
      formData0: {
        applyType: '',
        linker: '',
        linkerPhone: '',
        acceptanceDate: '',
        sysAttMainVo: {
          sysAttMainIds: [],
        },
        fileLists: [],
      },
      selectedRowKeys: [],
      companyList: [],
      projectData: {},
      contractData: {
        startDate: '',
        completeDate: '',
      },
      isMyProject: false,
      achievementData: [],
      achievementColumns: [
        {
          colKey: 'thesisCount',
          title: '论文个数',
          align: 'center',
          fixed: 'right',
          width: 100,
        },
        {
          colKey: 'treatiseCount',
          title: '著作个数',
          align: 'center',
          fixed: 'right',
          width: 100,
        },
        {
          colKey: 'patentCount',
          title: '专利个数',
          align: 'center',
          fixed: 'right',
          width: 100,
        },
        {
          colKey: 'softwareCopyrightCount',
          title: '软著个数',
          align: 'center',
          fixed: 'right',
          width: 100,
        },
        {
          colKey: 'awardsCount',
          title: '获奖个数',
          align: 'center',
          fixed: 'right',
          width: 100,
        },
        {
          colKey: 'performanceCount',
          title: '其他个数',
          align: 'center',
          fixed: 'right',
          width: 100,
        },
        {
          colKey: 'op',
          title: '操作',
          align: 'center',
          width: 140,
          fixed: 'right',
        },
      ],
    };
  },
  watch: {
    objId: {
      immediate: true,
      handler (val) {
        if (val) {
          this.getObj();
        }
      },
    },
  },
  methods: {
    checkYSYJS () {
      this.$api.kjxm.acceptance
        .opinionGetByProjectId(this.objId)
        .then((response) => {
          if (response.data) {
            this.openYSYJS = true;
          }
        })
        .catch((e) => {
          this.$message.error(e.toString());
        });
    },
    getObj () {
      this.checkYSYJS();
      this.$api.kjxm.project
        .get(this.objId)
        .then((pro) => {
          if (pro.data.isOldProject === '1') {
            this.projectFileData = this.projectFileData.map((val) => ({ ...val, c2: '否', require: false }));
          }
          if (pro.data.createUserId === Number(this.$store.state.user.userId)) {
            this.isMyProject = true;
          }
          this.projectData = pro.data;

          this.$api.kjxm.contract
            .getByProject(this.objId)
            .then((pro) => {
              this.contractData = pro.data;
            })
            .catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });

          this.$api.kjxm.acceptance
            .getByProject(this.objId)
            .then((response) => {
              if (response.data) {
                this.acceptanceId = response.data.id;
                response.data.sysAttMainVo = response.data.sysAttMainVo || { sysAttMainIds: [] };
                Object.assign(this.formData0, response.data);
                getFiles(response.data.id).then((res) => {
                  // const ids = [];
                  // if (res.data && res.data.length) {
                  //   res.data.forEach((item) => {
                  //     ids.push(item.id);
                  //     this.formData0.fileLists.push({ name: item.fileName, url: item.fullFilePath, id: item.id, filePath: item.filePath })
                  //   })
                  //   this.formData0.sysAttMainVo.sysAttMainIds = ids;
                  // }
                  const files = {};
                  res.data.forEach((item) => {
                    if (!files[item.moduleKey]) {
                      files[item.moduleKey] = [];
                    }
                    files[item.moduleKey].push({
                      name: item.fileName,
                      url: item.fullFilePath,
                      id: item.id,
                      filePath: item.filePath,
                    });
                  });
                  this.projectFileData.forEach((val, index) => {
                    this.projectFileData[index].fileLists = files[val.moduleKey] || [];
                    this.projectFileData[index].fileIds = files[val.moduleKey]?.map((val) => val.id) || [];
                  });
                  this.projectFileData2.forEach((val, index) => {
                    this.projectFileData2[index].fileLists = files[val.moduleKey] || [];
                    this.projectFileData2[index].fileIds = files[val.moduleKey]?.map((val) => val.id) || [];
                  });
                  this.projectFileData3.forEach((val, index) => {
                    this.projectFileData3[index].fileLists = files[val.moduleKey] || [];
                    this.projectFileData3[index].fileIds = files[val.moduleKey]?.map((val) => val.id) || [];
                  });
                });
              }
            })
            .catch((e) => {
              this.$message.error(e.toString());
            });
        })
        .catch((e) => {
          this.applyLoading = false;
          this.$message.error(e.toString());
        });
      this.$api.kjxm.project
        .companyGet(this.objId, 3)
        .then((pro) => {
          this.companyList = pro.data.filter((val) => val.type === '2').map((val) => val.name);
        })
        .catch((e) => {
          this.$message.error(e.toString());
        });
    },
    closeDialog () {
      this.$emit('reload');
      this.$emit('update:visible', false);
    },
    createPDF () {
      const instance = this.$loading({
        fullscreen: true,
        attach: 'body',
        preventScrollThrough: false,
      });
      this.$api.kjxm.acceptance
        .opinionCreatePDF(this.objId)
        .then((response) => {
          window.open(response.data.fullFilePath, '_blank');
          instance.hide();
        })
        .catch((e) => {
          instance.hide();
          this.$message.error(e.toString());
        });
    },
  },
};
</script>

<style scoped lang="less">
.tab-panel {
  padding: 10px;
  height: calc(65vh - 64px);
  overflow: scroll;
}

.tab-full-panel {
  padding: 10px;
  height: calc(80vh - 64px);
  overflow: scroll;
}

//.step-form {
//  padding: 0 24px;
//}

.t-row {
  margin-bottom: 14px;
}

.step-card {
  //height: 100%;
  margin-bottom: 14px;
}

.table-form {
  /deep/ .t-radio.t-is-disabled .t-radio__label {
    color: unset;
  }

  /deep/ .t-is-error .t-input__extra {
    position: static;
  }

  /deep/ .t-form__label {
    display: none;
  }

  .t-form__item {
    width: 100%;
  }

  .t-row {
    align-items: stretch;
    margin-bottom: 0px;

    //.t-form__item{
    //  width: 100%;
    //}
    .require {
      color: red;
      margin-right: 3px;
    }

    .t-col {
      border: 1px solid #ddd;
      color: #333;
      min-height: 37px;
      padding: 4px !important;
      //overflow: hidden;
      display: flex;
      align-items: center;
      margin: 0px -1px -1px 0px;
    }

    .title {
      background-color: #fafafa;
      justify-content: center;
      margin: 0px -1px -1px 0px;
      color: #606266;
    }
  }
}
</style>
